package com.homework;
//方法有返回值类型，构造器没有
public class Point {
        int x0;
        int y0;
        public Point(){
        }
        public Point(int x0, int y0){
            this.x0=x0;
            this.y0=y0;
        }
        public void movePoint(int dx,int dy){
            this.x0=dx+x0;
            this.y0=dy+y0;
        }

    public static void main(String[] args) {
        Point p1 = new Point(2, 3);
        Point p2 = new Point(4, 5);
        p1.movePoint(2, 2);
        p2.movePoint(2, 2);
        System.out.println(p1.x0 + "," + p1.y0);
        System.out.println(p2.x0 + "," + p2.y0);
    }
}